"use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["workflow-run"],{6923:(t,e,i)=>{i.d(e,{KJ:()=>s,X3:()=>o,g5:()=>r});var n=i(56038);let o=void 0===n.XC,s=!o;function r(){return!!o||!n.XC||!!(n.XC.querySelector('react-app[data-ssr="true"]')||n.XC.querySelector('react-partial[data-ssr="true"][partial-name="repos-overview"]'))}},11083:(t,e,i)=>{i.d(e,{X:()=>p,i:()=>h});var n=i(71315),o=i(34095),s=i(99223),r=i(69599),a=i(21067),l=i(70170);let d=[];function h(t,e=!1,i=.5){if(!n.X3&&!0!==(0,r.G7)("browser_stats_disabled")){if(i<0||i>1)throw RangeError("Sampling probability must be between 0 and 1");void 0===t.timestamp&&(t.timestamp=Date.now()),t.loggedIn=(0,a.M3)(),t.staff=p(),t.bundler=s.v,Math.random()JSON.stringify(t));for(;i.length>0;)e.push(function(t){let e=t.shift(),i=[e],n=e.length;for(;t.length>0&&n<=65536;){let e=t[0].length;if(n+e<=65536){let o=t.shift();i.push(o),n+=e}else break}return i}(i));return e}(d)){var e=t,i=`{"stats": [${o.join(",")}], "target": "${n.XC?.head?.querySelector('meta[name="ui-target"]')?.content||"full"}"}`;try{navigator.sendBeacon&&navigator.sendBeacon(e,i)}catch{}}d=[]}}function p(){return!!n.XC?.head?.querySelector('meta[name="user-staff"]')?.content}n.XC?.addEventListener("pagehide",g),n.XC?.addEventListener("visibilitychange",g)},21067:(t,e,i)=>{let n;function o(){if(!n)throw Error("Client env was requested before it was loaded. This likely means you are attempting to use client env at the module level in SSR, which is not supported. Please move your client env usage into a function.");return n}function s(){return n?.locale??"en-US"}function r(){return!!o().login}function a(){return o().login}i.d(e,{JK:()=>s,M3:()=>r,_$:()=>o,cj:()=>a}),!function(){if("undefined"!=typeof document){let t=document.getElementById("client-env");if(t)try{n=JSON.parse(t.textContent||"")}catch(t){console.error("Error parsing client-env",t)}}}()},21245:(t,e,i)=>{i.d(e,{x:()=>o});var n=i(51987);async function o(t){try{let e=await fetch(t,{credentials:"same-origin",headers:{Accept:"application/json",...(0,n.kt)()}});if(e.ok)return await e.json()}catch{}return null}},34095:(t,e,i)=>{i.d(e,{G:()=>o,K:()=>s});var n=i(71315);let o=n.XC?.readyState==="interactive"||n.XC?.readyState==="complete"?Promise.resolve():new Promise(t=>{n.XC?.addEventListener("DOMContentLoaded",()=>{t()})}),s=n.XC?.readyState==="complete"?Promise.resolve():new Promise(t=>{n.cg?.addEventListener("load",t)})},52401:(t,e,i)=>{i.d(e,{G:()=>a,y:()=>SignalRSocket});var n=i(81075),o=i(50467),s=i(28556),r=i(21245);let a={Invocation:1,StreamItem:2,Completion:3,StreamInvocation:4,CancelInvocation:5,Ping:6,Close:7};let SignalRSocket=class SignalRSocket extends EventTarget{static getInstance(t){return(0,n._)(SignalRSocket,SignalRSocket,l).has(t)||(0,n._)(SignalRSocket,SignalRSocket,l).set(t,new SignalRSocket(t)),(0,n._)(SignalRSocket,SignalRSocket,l).get(t)}socketDidReceiveMessage(t,e){let i=JSON.parse(e.split(SignalRSocket.RECORD_SEPARATOR)[0]);this.dispatchEvent(new CustomEvent("socketDidReceiveMessage",{detail:i})),i.type===a.Close&&t.close()}socketDidOpen(){this.handshake()}socketDidClose(){}socketDidFinish(){this.globalSocket=null,this.shouldTryAgainWithNewSocket&&(this.shouldTryAgainWithNewSocket=!1,setTimeout(()=>this.startOrContinueStreaming(this.xhrConnectionUrl,!0),Math.floor(Math.random()*SignalRSocket.JITTER_MAX_MILLISECONDS)+SignalRSocket.JITTER_MIN_MILLISECONDS))}socketShouldRetry(t,e){return e===SignalRSocket.ABNORMAL_CLOSURE?(this.shouldTryAgainWithNewSocket=!0,!1):!this.isFatalStatusCode(e)}async startOrContinueStreaming(t,e=!1){this.xhrConnectionUrl||(this.xhrConnectionUrl=t),(!this.isStreaming||e)&&(this.isStreaming=!0,await this.tryStartNewStream(this.xhrConnectionUrl))}closeExistingSocket(){this.globalSocket&&(this.globalSocket.close(),this.globalSocket=null)}onStreamFailure(){this.dispatchEvent(new CustomEvent("onStreamFailure"))}get reconnectWindow(){return Math.floor(Math.random()*SignalRSocket.JITTER_MAX_MILLISECONDS)+SignalRSocket.JITTER_MIN_MILLISECONDS}async tryStartNewStream(t){try{let e=await this.retrieveSocketURL(t);if(!e)return;this.socketUrl=e,this.globalSocket=new s.Zl(this.socketUrl,this,{timeout:4e3,attempts:10}),await this.globalSocket.open()}catch(t){throw this.onStreamFailure(),t}}handshake(){let{searchParams:t}=new URL(this.socketUrl,window.location.origin),e=t.get("tenantId"),i=t.get("runId");if(e&&i){this.sendPayload({protocol:"json",version:1});let t={arguments:[e,+i],target:this.target,type:a.Invocation};this.sendPayload(t)}}isFatalStatusCode(t){return t===SignalRSocket.POLICY_VIOLATION}sendPayload(t){this.globalSocket&&this.globalSocket.send(JSON.stringify(t)+SignalRSocket.RECORD_SEPARATOR)}constructor(t){super(),(0,o._)(this,"isStreaming",!1),(0,o._)(this,"shouldTryAgainWithNewSocket",!1),(0,o._)(this,"target",void 0),(0,o._)(this,"retrieveSocketURL",async t=>{let e=await (0,r.x)(t),i=e?.data.authenticated_url;if(!i)return null;let n=await (0,r.x)(i);return n?.logStreamWebSocketUrl??null}),this.target=t}};(0,o._)(SignalRSocket,"RECORD_SEPARATOR","\x1e"),(0,o._)(SignalRSocket,"ABNORMAL_CLOSURE",1006),(0,o._)(SignalRSocket,"POLICY_VIOLATION",1008),(0,o._)(SignalRSocket,"JITTER_MIN_MILLISECONDS",100),(0,o._)(SignalRSocket,"JITTER_MAX_MILLISECONDS",400);var l={writable:!0,value:new Map}},56038:(t,e,i)=>{i.d(e,{Kn:()=>r,XC:()=>o,cg:()=>s,fV:()=>a});let n="undefined"!=typeof FORCE_SERVER_ENV&&FORCE_SERVER_ENV,o="undefined"==typeof document||n?void 0:document,s="undefined"==typeof window||n?void 0:window,r="undefined"==typeof history||n?void 0:history,a="undefined"==typeof location||n?{pathname:"",origin:"",search:"",hash:"",href:""}:location},66282:(t,e,i)=>{var n=i(50467),o=i(31635),s=i(39595);let r=class AnnotationMessageElement extends HTMLElement{connectedCallback(){this.annotationTextComponent=this.annotationContainer.firstElementChild,this.initalizeEventListeners()}attributeChangedCallback(){this.expanded?(this.displayShowLessButton(),this.annotationContainer.classList.replace("annotation--contracted","annotation--expanded")):(this.displayShowMoreButton(),this.annotationContainer.classList.replace("annotation--expanded","annotation--contracted"))}toggleExpansion(){this.expanded=!this.expanded}calculateOverflow(){if(this.annotationTextComponent){let t=this.isEllipsisActive(this.annotationTextComponent);if(this.expanded){if(!t){let t=this.isAnnotationWrapped(this.annotationTextComponent);this.expanded&&t?this.displayShowLessButton():t?this.displayShowMoreButton():this.hideBothButtons()}}else t?this.displayShowMoreButton():this.hideBothButtons()}}displayShowLessButton(){this.setButtonHiddenProperties(!1,!0)}displayShowMoreButton(){this.setButtonHiddenProperties(!0,!1)}hideBothButtons(){this.setButtonHiddenProperties(!0,!0)}setButtonHiddenProperties(t,e){this.showLessButton.hidden=t,this.showMoreButton.hidden=e}initalizeEventListeners(){"ResizeObserver"in window?new ResizeObserver(()=>this.calculateOverflow()).observe(this.annotationTextComponent):window.addEventListener("resize",()=>this.calculateOverflow())}isEllipsisActive(t){return t.offsetWidthi}constructor(...t){super(...t),(0,n._)(this,"expanded",!1)}};(0,n._)(r,"observedAttributes",["data-expanded"]),(0,o.Cg)([s.aC],r.prototype,"showMoreButton",void 0),(0,o.Cg)([s.aC],r.prototype,"showLessButton",void 0),(0,o.Cg)([s.aC],r.prototype,"annotationContainer",void 0),(0,o.Cg)([s.CF],r.prototype,"expanded",void 0),r=(0,o.Cg)([s.p_],r);var a=i(97797);(0,a.on)("click",".js-show-more-environments",function(t){let e=t.target.closest(".js-hidden-environments-container"),i=e.querySelector(".js-hidden-environments"),n=e.querySelector(".js-shown-environments");n&&n.classList.add("d-none"),i&&i.classList.remove("d-none")}),(0,a.on)("click",".js-gates-dialog-environment-checkbox",function(t){let e=t.target,i=e.closest(".js-gates-dialog");if(null==i)return;let n=i.querySelector(".js-gates-approval-dialog-reject-button"),o=i.querySelector(".js-gates-approval-dialog-approve-button"),s=i.querySelector(".js-gates-approval-dialog-count-display");if(null!=n&&null!=o&&null!=s){let t=i.querySelectorAll(".js-gates-dialog-environment-checkbox:checked"),e=0===t.length;n.disabled=e,o.disabled=e,s.hidden=e,s.textContent=t.length.toString()}let r=e.closest(".ActionsApprovalOverlay-environment");r&&(e.checked?r.classList.add("selected-approval-environment"):r.classList.remove("selected-approval-environment"))});var l=i(34095),d=i(51519);let h=class MouseDriver{setupListener(){document.body.addEventListener("pointerup",()=>this.up()),document.body.addEventListener("pointermove",t=>this.move(t)),this.graph.addEventListener("pointerdown",t=>this.down(t)),this.graph.addEventListener("pointermove",t=>this.move(t)),this.graph.addEventListener("click",t=>this.click(t),{capture:!0}),this.graph.addEventListener("wheel",t=>this.handleWheel(t),{capture:!1,passive:!1})}updateCursor(){this.dragging?this.graph.canvas.classList.add("dragging"):this.graph.canvas.classList.remove("dragging")}up(){this.dragging=!1,this.updateCursor()}click(t){(Math.abs(this.dragStartX-t.pageX)>5||Math.abs(this.dragStartY-t.pageY)>5)&&(t.preventDefault(),t.stopPropagation())}down(t){0!==t.button||this.dragging||(this.dragging=!0,this.dragStartX=t.pageX,this.dragStartY=t.pageY,this.lastPoint.x=t.pageX,this.lastPoint.y=t.pageY,this.updateCursor())}move(t){let e=t.pageX,i=t.pageY;if(this.dragging){let e=t.pageX-this.lastPoint.x,i=t.pageY-this.lastPoint.y;this.graph.dragMove(e,i)}this.lastPoint.x=e,this.lastPoint.y=i}handleWheel(t){let e=this.graph.getCurrentZoom();this.graph.setNormalizedZoom(this.graph.getCurrentZoom()-t.deltaY/100),this.graph.setFitToWindowBtnEnabled(!0),this.moveZoomOffset(t,e),t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault()}moveZoomOffset(t,e){let i=this.graph.visualGraph.getBoundingClientRect(),n=(this.graph.getCurrentZoom()-e)/e,o=t.clientX-i.left,s=t.clientY-i.top;this.graph.dragMove(-(o*n*1),-(s*n*1))}constructor(t){(0,n._)(this,"dragStartX",void 0),(0,n._)(this,"dragStartY",void 0),(0,n._)(this,"dragging",void 0),(0,n._)(this,"lastPoint",void 0),(0,n._)(this,"graph",void 0),this.dragging=!1,this.graph=t,this.lastPoint={x:0,y:0},this.setupListener()}},c=class KeyDriver{moveBothX(t){this.graph.dragMove(t,0)}moveBothY(t){this.graph.dragMove(0,t)}down(t){let e=!0;switch(t.key){case"ArrowLeft":this.moveBothX(100);break;case"ArrowUp":this.moveBothY(30);break;case"ArrowRight":this.moveBothX(-100);break;case"ArrowDown":this.moveBothY(-30);break;default:e=!1}e&&t.preventDefault()}constructor(t){(0,n._)(this,"graph",void 0),this.graph=t,this.graph.addEventListener("keydown",t=>this.down(t))}},u="active",g="active--in",p="active--out",m=class ActionGraphElement extends HTMLElement{async connectedCallback(){new h(this),new c(this),document.addEventListener("run-sidebar-job-enter",t=>this.jobEnter(t)),document.addEventListener("run-sidebar-job-leave",()=>this.jobLeave()),await l.K,this.drawLines(),this.fitToWindow(),this.visualGraph.style.opacity="1"}cancelEvent(t){t.preventDefault(),t.stopPropagation()}async updateJob({target:t}){await (0,d.le)(t),this.drawLines()}async expandMatrix(t){let e=t.target,i=e.closest("button")?.getAttribute("data-update-url"),n=e.closest(".js-graph-matrix");n&&i&&(n.setAttribute("data-url",i),await (0,d.le)(n),this.fitToWindow(!1),this.drawLines())}getCurrentZoom(){return this.currentZoom}dragMove(t,e){let i=Math.round((parseFloat(this.visualGraph.getAttribute("data-x"))||0)+t),n=Math.round((parseFloat(this.visualGraph.getAttribute("data-y"))||0)+e);this.visualGraph.style.transform=`translate(${i}px, ${n}px)`,this.visualGraph.setAttribute("data-x",`${i}`),this.visualGraph.setAttribute("data-y",`${n}`),this.setFitToWindowBtnEnabled(!0)}setFitToWindowBtnEnabled(t){this.zoomFit.disabled=!t}setNormalizedZoom(t){let e=t;ethis.MAX_ZOOM&&(e=this.MAX_ZOOM),this.setZoom(e)}in(){this.zoomOut.disabled=!1,this.setFitToWindowBtnEnabled(!0),this.setNormalizedZoom(this.currentZoom+this.ZOOM_INCREMENT)}out(){this.zoomIn.disabled=!1,this.setFitToWindowBtnEnabled(!0),this.setNormalizedZoom(this.currentZoom-this.ZOOM_INCREMENT)}fit(){this.setFitToWindowBtnEnabled(!1),this.fitToWindow()}setZoomInBtnDisabled(t){this.zoomIn.disabled=t}setZoomOutBtnDisabled(t){this.zoomOut.disabled=t}setZoom(t){this.currentZoom=t,this.setZoomInBtnDisabled(this.MAX_ZOOM===this.currentZoom),this.setZoomOutBtnDisabled(this.minZoom===this.currentZoom),this.stages.style.transform=`scale(${this.currentZoom})`}fitToWindow(t=!0){let e=this.clientWidth-48,i=this.clientHeight-75,n=this.stages.clientWidth,o=Math.min(Math.min(e/n,i/this.stages.clientHeight),this.MAX_ZOOM);this.minZoom=Math.min(o,this.MAX_ZOOM),t&&(this.setZoom(o),this.visualGraph.style.transform="translate(0, 0)",this.visualGraph.setAttribute("data-x","0"),this.visualGraph.setAttribute("data-y","0"))}mouseEnter(t){this.setHighlightedGroup(t.target.id)}mouseLeave(){this.clearHighlightedGroups()}jobEnter(t){let e=t.detail?.jobId;if(!e)return;let i=this.matrices.find(t=>t.getAttribute("data-job-id")===e);i||(i=this.jobs.find(t=>t.getAttribute("data-job-id")===e));let n=i?.getAttribute("data-group-id");n&&this.setDownstreamHighlightGroups(n)}jobLeave(){this.clearHighlightedGroups()}setDownstreamHighlightGroups(t){if(this.allHighlightedGroupIds=[t],this.visualGraph.classList.add(u),this.toggleClasses(t,[u,p],!0),this.connectorLineHighlights.classList.add(u),!this.dependencies[t])return;let e=new Set(this.getDownstreamIds(t,0));for(let t of e)this.toggleClasses(t,[u,g,p],!0);for(let i of(this.allHighlightedGroupIds=this.allHighlightedGroupIds.concat([...e]),this.pathHighlights)){let n=i.getAttribute("data-from"),o=i.getAttribute("data-to");(n===t||e.has(n))&&e.has(o)&&i.classList.add(u)}}setHighlightedGroup(t){if(this.allHighlightedGroupIds=[t],this.visualGraph.classList.add(u),this.toggleClasses(t,[u,g,p],!0),this.connectorLineHighlights.classList.add(u),!this.dependencies[t])return;for(let e of this.dependencies[t]?.incoming??[])this.toggleClasses(e,[u,g],!0);for(let e of this.dependencies[t]?.outgoing??[])this.toggleClasses(e,[u,p],!0);let e=new Set([t,...this.dependencies[t].incoming,...this.dependencies[t].outgoing]);for(let i of(this.allHighlightedGroupIds=[...e],this.pathHighlights)){let n=i.getAttribute("data-from"),o=i.getAttribute("data-to");(n===t||o===t)&&(e.has(n)||e.has(o))&&i.classList.add(u)}}getDownstreamIds(t,e){if(e>=256)return[];let i=[];for(let n of this.dependencies[t]?.incoming??[])i.push(n),i=i.concat(this.getDownstreamIds(n,e+1));return i}toggleClasses(t,e,i){let n=document.getElementById(t);if(n)for(let t of e)n.classList.toggle(t,i)}clearHighlightedGroups(){if(this.visualGraph.classList.remove(u),0===this.allHighlightedGroupIds.length)return;let t=[u,g,p];for(let e of this.allHighlightedGroupIds){let i=document.getElementById(e);if(i)for(let e of t)i.classList.remove(e)}for(let t of this.pathHighlights)t.classList.remove(u);this.allHighlightedGroupIds=[]}drawLines(){for(let t of this.connectorLines)t.setAttribute("width",`${this.stages.clientWidth}`),t.setAttribute("height",`${this.stages.clientHeight}`);let t=24;for(let e of(this.dependencies={},this.paths.reduce((e,i)=>{let n=this.getLineTarget(i.getAttribute("data-from")),o=this.getLineTarget(i.getAttribute("data-to"));if(!n||!o)return e;let s={path:i,from:n,to:o,direction:this.getPathDirection(n,o)};if(""!==s.direction){let e=Math.abs(n.rect.y-o.rect.y)/2;t=Math.min(t,e)}for(let[t,e,i]of[[n.id,o.id,"incoming"],[o.id,n.id,"outgoing"]])this.dependencies[t]?this.dependencies[t][i].push(e):this.dependencies[t]={incoming:[],outgoing:[],[i]:[e]};return e.push(s),e},[])))this.renderLine(e,t)}getLineTarget(t){if(!t)return;let e=document.getElementById(t);if(e)return{id:t,rect:this.getRect(e),isGroup:!!e?.classList?.contains("WorkflowCard-group")}}renderLine(t,e){let i=this.getPath(e,t.from,t.to,t.direction);t.path.setAttribute("d",i)}getPathDirection(t,e){let i=t.rect,n=e.rect;return i.y===n.y?"":i.xn.y?"up":"down":i.y>n.y?"down":"up"}getRect(t){let e=23;t.classList&&t.classList.contains("WorkflowCard-group")&&(e=39);let i=t.parentElement,n=t.offsetLeft-i.offsetLeft;return{x:t.offsetLeft||0,y:e+(t.offsetTop||0),h:t.offsetHeight||0,w:t.offsetWidth||0,adjust:n}}getPath(t,e,i,n){let o=i.rect.adjust,s=e.rect,r=i.rect;if(s.y===r.y)return`M ${s.x+s.w} ${s.y} H ${r.x}`;if("down"===n){let e=r.x-28-t-o,i=s.y,n=e+t,a=r.y-t;return` M ${s.x+s.w} ${s.y} H ${e} C ${e+t/2} ${i} ${e+t} ${i+t/2} ${e+t} ${i+t} V ${a} C ${n} ${a+t/2} ${n+t/2} ${a+t} ${n+t} ${a+t} H ${r.x}`}if("up"===n){let e=r.x-28-t-o,i=s.y,n=e+t,a=r.y+t;return` M ${s.x+s.w} ${s.y} H ${e} C ${e+t/2} ${i} ${e+t} ${i-t/2} ${e+t} ${i-t} V ${a} C ${n} ${a-t/2} ${n+t/2} ${a-t} ${n+t} ${a-t} H ${r.x}`}return""}constructor(...t){super(...t),(0,n._)(this,"ZOOM_INCREMENT",.25),(0,n._)(this,"MAX_ZOOM",1),(0,n._)(this,"currentZoom",1),(0,n._)(this,"minZoom",1),(0,n._)(this,"allHighlightedGroupIds",[]),(0,n._)(this,"dependencies",{})}};(0,o.Cg)([s.aC],m.prototype,"canvas",void 0),(0,o.Cg)([s.aC],m.prototype,"visualGraph",void 0),(0,o.Cg)([s.aC],m.prototype,"zoomFit",void 0),(0,o.Cg)([s.aC],m.prototype,"zoomIn",void 0),(0,o.Cg)([s.aC],m.prototype,"zoomOut",void 0),(0,o.Cg)([s.aC],m.prototype,"stages",void 0),(0,o.Cg)([s.aC],m.prototype,"connectorLineHighlights",void 0),(0,o.Cg)([s.zV],m.prototype,"connectorLines",void 0),(0,o.Cg)([s.zV],m.prototype,"paths",void 0),(0,o.Cg)([s.zV],m.prototype,"pathHighlights",void 0),(0,o.Cg)([s.zV],m.prototype,"jobs",void 0),(0,o.Cg)([s.zV],m.prototype,"matrices",void 0),m=(0,o.Cg)([s.p_],m);var f=i(35750),v=i(18150),b=i(52401),y=new WeakMap,C=new WeakMap,S=new WeakMap,E=new WeakMap;let w=class StreamingGraphJobElement extends HTMLElement{connectedCallback(){(0,f._)(this,E).observe(this,{attributes:!0,childList:!0,subtree:!0});let t=this.streamingUrl,{signal:e}=(0,f._)(this,y);if(this.stepsFromResults&&this.addEventListener("socket:message",this.handleAliveEvent.bind(this)),!this.shouldStream||!t||this.allRunsConcluded()||this.stepsFromResults){(0,f._)(this,y).abort(),(0,f._)(this,C).closeExistingSocket();return}(0,f._)(this,C).startOrContinueStreaming(t),(0,f._)(this,C).addEventListener("socketDidReceiveMessage",t=>{t instanceof CustomEvent&&this.processSocketMessage(t.detail)},{signal:e})}disconnectedCallback(){this.removeEventListener("socket:message",this.handleAliveEvent.bind(this)),(0,f._)(this,y).abort(),(0,f._)(this,E).disconnect()}processSocketMessage(t){if(t.type!==b.G.Ping){if("stepProgressUpdates"===t.target)for(let e of t.arguments)for(let t of e)(0,f._)(this,S).add(t.parentRecordId);this.handleStepUpdated()}}handleAliveEvent(t){let e=t?.detail;if(e&&e.name?.split(":")?.[0]==="actions_results"&&1===e.data.kind){let t=e.data.data;t.length>1&&t[0]&&((0,f._)(this,S).add(t[0].workflowJobRunBackendId),this.handleStepUpdated())}}handleStepUpdated(){for(let t of[...(0,f._)(this,S)]){let e=document.querySelector(`streaming-graph-job[data-external-id="${t}"]`);if(e){let t="true"===e.getAttribute("data-concluded"),i=!!e.getAttribute("data-url");!t&&i&&(0,d.le)(e)}}}allRunsConcluded(){return 0===document.querySelectorAll("streaming-graph-job[data-concluded='false']").length}showTooltip(){if(!this.tooltip)return;let t=this.name.scrollWidth>this.name.clientWidth,e=null!=this.ellipsis;t||e?this.tooltip.style.display="":this.tooltip.style.display="none"}constructor(...t){super(...t),(0,n._)(this,"streamingUrl",""),(0,n._)(this,"shouldStream",!1),(0,n._)(this,"stepsFromResults",!1),(0,v._)(this,y,{writable:!0,value:new AbortController}),(0,v._)(this,C,{writable:!0,value:b.y.getInstance("WatchRunStepsProgressAsync")}),(0,v._)(this,S,{writable:!0,value:new Set}),(0,v._)(this,E,{writable:!0,value:new MutationObserver(()=>{this.showTooltip()})})}};(0,o.Cg)([s.aC],w.prototype,"name",void 0),(0,o.Cg)([s.aC],w.prototype,"tooltip",void 0),(0,o.Cg)([s.aC],w.prototype,"ellipsis",void 0),(0,o.Cg)([s.CF],w.prototype,"streamingUrl",void 0),(0,o.Cg)([s.CF],w.prototype,"shouldStream",void 0),(0,o.Cg)([s.CF],w.prototype,"stepsFromResults",void 0),w=(0,o.Cg)([s.p_],w);let _=class JobAnnotationsElement extends HTMLElement{close(){this.bodyContainer.hidden=!0,this.closeButton.hidden=!0,this.openButton.hidden=!1}open(){this.bodyContainer.hidden=!1,this.closeButton.hidden=!1,this.openButton.hidden=!0}};(0,o.Cg)([s.aC],_.prototype,"closeButton",void 0),(0,o.Cg)([s.aC],_.prototype,"openButton",void 0),(0,o.Cg)([s.aC],_.prototype,"bodyContainer",void 0),_=(0,o.Cg)([s.p_],_);var L=i(53627);let k=class JobSummariesElement extends HTMLElement{connectedCallback(){document.addEventListener("click",this.checkForHashReset.bind(this))}disonnectedCallback(){document.removeEventListener("click",this.checkForHashReset.bind(this))}checkForHashReset(t){let e=this.querySelector("job-summary:target");if(!e||!(t.target instanceof HTMLElement)||e.contains(t.target))return;let i=window.scrollY;(0,L.K3)(),i&&window.scrollTo({top:i})}};k=(0,o.Cg)([s.p_],k);let A=class JobSummaryElement extends HTMLElement{connectedCallback(){this.isLoaded()||this.preloadIfPermalink(),this.fragment&&this.fragment.addEventListener("error",this.handleFragmentError.bind(this))}isLoaded(){return!this.fragment}loadSummary(){this.fragment&&(this.loadButton&&(this.loadButton.hidden=!0),this.error&&(this.error.hidden=!0),this.loader&&(this.loader.hidden=!1),this.fragment.src=new URL(this.contentPath,window.location.origin).toString())}retrySummary(){this.fragment&&(this.fragment.src="",this.loadSummary())}handleFragmentError(){this.loader&&(this.loader.hidden=!0),this.error&&(this.error.hidden=!1)}preloadIfPermalink(){`#${this.id}`===window.location.hash&&this.loadSummary()}};(0,o.Cg)([s.aC],A.prototype,"fragment",void 0),(0,o.Cg)([s.aC],A.prototype,"loadButton",void 0),(0,o.Cg)([s.aC],A.prototype,"retryButton",void 0),(0,o.Cg)([s.aC],A.prototype,"loader",void 0),(0,o.Cg)([s.aC],A.prototype,"error",void 0),(0,o.Cg)([s.CF],A.prototype,"contentPath",void 0),A=(0,o.Cg)([s.p_],A);let R=class RunSummaryElement extends HTMLElement{mouseEnterRerun(t){let e=t.target.getAttribute("data-job-id");e&&this.dispatchEvent(new CustomEvent("run-sidebar-job-enter",{detail:{jobId:e},bubbles:!0}))}mouseLeaveRerun(){this.dispatchEvent(new CustomEvent("run-sidebar-job-leave",{bubbles:!0}))}};R=(0,o.Cg)([s.p_],R)},69599:(t,e,i)=>{i.d(e,{G7:()=>l,XY:()=>d,fQ:()=>a});var n=i(5225),o=i(21067);function s(){return new Set((0,o._$)().featureFlags)}let r=i(71315).X3||function(){try{return process?.env?.STORYBOOK==="true"}catch{return!1}}()?s:(0,n.A)(s);function a(){return Array.from(r())}function l(t){return r().has(t)}let d={isFeatureEnabled:l}},71315:(t,e,i)=>{i.d(e,{KJ:()=>n.KJ,Kn:()=>o.Kn,X3:()=>n.X3,XC:()=>o.XC,cg:()=>o.cg,fV:()=>o.fV,g5:()=>n.g5});var n=i(6923),o=i(56038)},74057:(t,e,i)=>{i.d(e,{A:()=>f});let n="data-close-dialog",o=`[${n}]`;function s(t){let e=Array.from(t.querySelectorAll("[autofocus]")).filter(a)[0];e||(e=t,t.setAttribute("tabindex","-1")),e.focus()}function r(t){let e=t.currentTarget;e instanceof Element&&("Escape"===t.key||"Esc"===t.key?(c(e,!1),t.stopPropagation()):"Tab"===t.key&&function(t){if(!(t.currentTarget instanceof Element))return;let e=t.currentTarget.querySelector("details-dialog");if(!e)return;t.preventDefault();let i=Array.from(e.querySelectorAll("*")).filter(a);if(0===i.length)return;let n=t.shiftKey?-1:1,o=e.getRootNode(),s=e.contains(o.activeElement)?o.activeElement:null,r=-1===n?-1:0;if(s instanceof HTMLElement){let t=i.indexOf(s);-1!==t&&(r=t+n)}r<0?r=i.length-1:r%=i.length,i[r].focus()}(t))}function a(t){var e;return t.tabIndex>=0&&!t.disabled&&!(e=t).hidden&&(!e.type||"hidden"!==e.type)&&(e.offsetWidth>0||e.offsetHeight>0)}function l(t){let e=t.querySelector("details-dialog");return!(e instanceof DetailsDialogElement)||e.dispatchEvent(new CustomEvent("details-dialog-close",{bubbles:!0,cancelable:!0}))}function d(t){if(!(t.currentTarget instanceof Element))return;let e=t.currentTarget.closest("details");e&&e.hasAttribute("open")&&(l(e)||(t.preventDefault(),t.stopPropagation()))}function h(t){let e=t.currentTarget;if(!(e instanceof Element))return;let i=e.querySelector("details-dialog");if(i instanceof DetailsDialogElement)if(e.hasAttribute("open")){let t="getRootNode"in i?i.getRootNode():document;t.activeElement instanceof HTMLElement&&m.set(i,{details:e,activeElement:t.activeElement}),s(i),e.addEventListener("keydown",r)}else{for(let t of i.querySelectorAll("form"))t.reset();let t=function(t,e){let i=m.get(e);return i&&i.activeElement instanceof HTMLElement?i.activeElement:t.querySelector("summary")}(e,i);t&&t.focus(),e.removeEventListener("keydown",r)}}function c(t,e){e!==t.hasAttribute("open")&&(e?t.setAttribute("open",""):l(t)&&t.removeAttribute("open"))}function u(t){let e=t.currentTarget;if(!(e instanceof Element))return;let i=e.querySelector("details-dialog");if(!(i instanceof DetailsDialogElement))return;let n=i.querySelector("include-fragment:not([src])");if(!n)return;let o=i.src;null!==o&&(n.addEventListener("loadend",()=>{e.hasAttribute("open")&&s(i)}),n.setAttribute("src",o),p(e))}function g(t,e,i){p(t),e&&t.addEventListener("toggle",u,{once:!0}),e&&i&&t.addEventListener("mouseover",u,{once:!0})}function p(t){t.removeEventListener("toggle",u),t.removeEventListener("mouseover",u)}let m=new WeakMap;let DetailsDialogElement=class DetailsDialogElement extends HTMLElement{static get CLOSE_ATTR(){return n}static get CLOSE_SELECTOR(){return o}constructor(){super(),m.set(this,{details:null,activeElement:null}),this.addEventListener("click",function({target:t}){if(!(t instanceof Element))return;let e=t.closest("details");e&&t.closest(o)&&c(e,!1)})}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",t||"")}get preload(){return this.hasAttribute("preload")}set preload(t){t?this.setAttribute("preload",""):this.removeAttribute("preload")}connectedCallback(){this.setAttribute("role","dialog"),this.setAttribute("aria-modal","true");let t=m.get(this);if(!t)return;let e=this.parentElement;if(!e)return;let i=e.querySelector("summary");i&&(i.hasAttribute("role")||i.setAttribute("role","button"),i.addEventListener("click",d,{capture:!0})),e.addEventListener("toggle",h),t.details=e,g(e,this.src,this.preload)}disconnectedCallback(){let t=m.get(this);if(!t)return;let{details:e}=t;if(!e)return;e.removeEventListener("toggle",h),p(e);let i=e.querySelector("summary");i&&i.removeEventListener("click",d,{capture:!0}),t.details=null}toggle(t){let e=m.get(this);if(!e)return;let{details:i}=e;i&&c(i,t)}static get observedAttributes(){return["src","preload"]}attributeChangedCallback(){let t=m.get(this);if(!t)return;let{details:e}=t;e&&g(e,this.src,this.preload)}};let f=DetailsDialogElement;window.customElements.get("details-dialog")||(window.DetailsDialogElement=DetailsDialogElement,window.customElements.define("details-dialog",DetailsDialogElement))},95493:(t,e,i)=>{function n(t,e){return o(function(t){if(t.activeElement!==t.body)return t.activeElement;var e=t.querySelectorAll(":hover"),i=e.length;if(i)return e[i-1]}(t),e)}function o(t,e){var i=t;if(!i)return Promise.resolve(e());var n=i.ownerDocument.documentElement,o=function(t){for(var e=[];t;){var i=t.getBoundingClientRect(),n=i.top,o=i.left;e.push({element:t,top:n,left:o}),t=t.parentElement}return e}(i);return Promise.resolve(e()).then(function(t){var e=function(t){for(var e=0;en,_H:()=>o})},99223:(t,e,i)=>{i.d(e,{k:()=>r,v:()=>a});var n=i(5225),o=i(71315);let s=(0,n.A)(function(){return o.XC?.head?.querySelector('meta[name="runtime-environment"]')?.content||""}),r=(0,n.A)(function(){return"enterprise"===s()}),a="webpack"}},t=>{t.O(0,["vendors-node_modules_github_selector-observer_dist_index_esm_js","vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_morphdom_dist_morphdom-e-c1896e","vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-17fcc7","packages_updatable-content_updatable-content_ts"],()=>t(t.s=66282)),t.O()}]); //# sourceMappingURL=workflow-run-5987e18585c0.js.map